package com.itheima.vo.sms;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.itheima.vo.pms.Product;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * 活动关联商品表
 */
@Data
@TableName("sms_flash_promotion_product_relation")
public class SmsFlashPromotionProductRelation implements Serializable {
    @TableId(value = "id", type = IdType.AUTO)
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long id;

    private Long flashPromotionId;
    /**
     * 编号
     */
    private Long flashPromotionSessionId;

    private Long productId;

    /**
     * 限时购价格
     */
    private BigDecimal flashPromotionPrice;

    /**
     * 限时购数量
     */
    private Integer flashPromotionCount;
    /**
     * 每人限购数量
     */
    private Integer flashPromotionLimit;
    /**
     * 排序
     */
    private Integer sort;

    @TableField(exist = false)
    private List<SmsFlashPromotionProductRelation> relationList;

    @TableField(exist = false)
    private Product product;
}
